package com.lyp.qczp.contoller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import com.lyp.qczp.entity.Modules;
import com.lyp.qczp.service.ModulesService;

@RestController
@CrossOrigin(origins = "*")
public class ModulesController {
	@Autowired
	private ModulesService modulesService;
	
	@PostMapping("/insertModules")
	public Integer insertModules(Modules modules) {
		return modulesService.insertModules(modules);
	}
	@PostMapping("/deleteModules")
	public Integer deleteModules(Integer mId) {
		return modulesService.deleteModules(mId);
	}
	@PostMapping("/updateModules")
	public Integer updateModules(Modules modules) {
		return modulesService.updateModules(modules);
	}
	@PostMapping("/findBymId")
	public Modules findBymId(Integer mId) {
		// TODO Auto-generated method stub
		return modulesService.findBymId(mId);
	}
	
	
}
